#include "PointLabCore/StdStringHelper.h"

namespace PointLabCore
{
	std::string StdStringHelper::toUpper(const std::string& str)
	{
		std::string strTemp = str;
		transform(strTemp.begin(), strTemp.end(), strTemp.begin(), toupper);
		return strTemp;
	}

	bool StdStringHelper::compare(const std::string& s1, const std::string& s2, CaseSensitivity ca /*= CaseSensitivity::NO*/)
	{
		switch (ca)
		{
		case CaseSensitivity::YES:
			return toUpper(s1) == toUpper(s2);
			break;
		case CaseSensitivity::NO:
			return s1 == s2;
			break;
		default:
			return false;
			break;
		}
	}
}